1. Field of the Invention
The present invention generally relates to document image analysis and, more particularly, to segmentation of an image using a method which combines distance in the feature space with distance in the spatial domain to produce regions of near-uniform color.
2. Background Description
In many applications, such as document image analysis, and analysis of digital images, an important processing stage is that of segmentation of the image into regions of near-uniform color. The results of this stage are used for further analysis, such as a determination of the number of colors present in the image, identification of regions with specific color and an analysis of geometric features of regions with uniform color. Applying color cluster analysis to the entire image is a time-consuming process, and also results in too many clusters being identified.
It is therefore an object of the present invention to provide an improved method for the complete segmentation of an image into regions of near-uniform color.
According to the invention, there is provided a method which segments the image into blocks of size Mxc3x97N (say, 128xc3x97128) and applies color clustering within these blocks. This is done with a sequential color clustering algorithm. Subsequent to this, the blocks that have similar color characteristics are identified. Finally, a connected component analysis in the spatial domain is performed to identify blocks that are both similar in color characteristics as well as spatially contiguous. Thus, our invention combines distance in the feature space with distance in the spatial domain. This results in spatially compact color regions which have similar color information.
The result of applying this technique is a complete segmentation of the image according to regions of near-uniform color. This can then be used for performing operations like optical character recognition, or adaptive compression of the image on the number of colors present.